#include <iostream>
using namespace std;
#define month1 1


int t1,t2;
void output();
int twoyear(int year1,int year2);
int twomonth(int month2,int year);
int twoday(int day2);

int main()
{
	while(cin>>t1>>t2){
		output();
	}
}

void output()
{
	int y1,y2;
	int m1,m2;
	int d1,d2;
	d1=t1%100;t1=t1/100;
	m1=t1%100;t1=t1/100;
	y1=t1;
	d2=t2%100;t2=t2/100;
	m2=t2%100;t2=t2/100;
	y2=t2;
	int dayintwoyear=twoyear(y1,y2);
	
	int k1=twomonth(m1,y1)+d1;
	int k2=twomonth(m2,y2)+d2;
	
	cout<<dayintwoyear+k2-k1+1<<endl;
	/*
	int sum1,sum2;
	sum1=twoyear(y1)+twomonth(m1)+twoday(d1);
	sum2=twoyear(y2)+twomonth(m2)+twoday(d2);
	cout<<sum2-sum1+1<<endl;
	*/
	
}

int twoyear(int year1,int year2)
{
	int day=0;
	for(int i=year1;i<year2;i++){
		if(i%400==0||(i%4==0&&i%100!=0)){
			day=day+366;
		}
		else day=day+365;
	}
	return day;
}
int twomonth(int month2,int year)
{
	int day=0;
	for(int i=month1;i<month2;i++){
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12){
			day=day+31;
		}
		else if(i==2){
			if(year%400==0||(year%4==0&&year%100!=0)){
				day=day+29;
			}
			else day=day+28;
		}
		else day=day+30;	
	}
	return day;
}

int twoday(int day2)
{
	return day2;
}









